<!DOCTYPE html>
<meta charset="UTF-8">

<div  style="width: 40%;margin: 0 auto;  padding: 70px;">
	<form action="" method="post">
		<div class="layui-form-item">
		<label class="layui-form-label">用户名</label>
			<div class="layui-input-block">
			   <input type="text" name="username" th:value="${user.username}" class="layui-input" disabled="disabled"/>
			</div>
		</div>
		<div class="layui-form-item">
		<label class="layui-form-label">性别</label>
		<div class="layui-input-block">
			<input type="text" name="sex" th:value="${user.sex}" class="layui-input"th:onblur="shiqu()"/>
			</div>
		</div>
			<div class="layui-form-item">
		<label class="layui-form-label">年龄</label>
		<div class="layui-input-block">
			<input type="text" name="age" th:value="${user.age}" class="layui-input"th:onblur="shiqu()"/>
		</div>
		</div>
		 	<div class="layui-form-item">
		<label class="layui-form-label">手机号</label>
		<div class="layui-input-block">
			<input type="text" name="phone" th:value="${user.phone}" class="layui-input"th:onblur="shiqu()"/>
		</div>
		</div>
		<div class="layui-form-item">
		<label class="layui-form-label">真实姓名</label>
		<div class="layui-input-block">
			<input type="text" name="name" th:value="${user.name}" class="layui-input"th:onblur="shiqu()"/>
		</div>
		</div>
	</form>
</div>
<script>
	function shiqu(){
		/* var username = $("input[ name='username'] ").val(); */
		var name = $("input[ name='name'] ").val();
		var phone = $("input[ name='phone'] ").val();
		var age = $("input[ name='age'] ").val();
		var sex = $("input[ name='sex'] ").val();
		$.post("user/changeInfo?name="+name+"&phone="+phone+"&age="+age+"&sex="+sex);
	}
</script>

	